<template>
  <el-dialog title="添加收货地址" :visible="s" :close-on-click-modal="false" center>
    <el-form ref="dataForm" :model="resFrom" label-position="left" label-width="100px"
             style="width: 500px; margin-left:150px;">

      <el-form-item label="收货人" dis prop="name">
        <el-input v-model="resFrom.name"/>
      </el-form-item>
      <el-form-item   label="收货地区" style="min-width: 750px">
        <cityThree></cityThree>
      </el-form-item>
      <el-form-item  label="街道地址">
        <el-input v-model="resFrom.address"/>
      </el-form-item>
      <el-form-item  label="手机号码">
        <el-input v-model="resFrom.phone"/>
      </el-form-item>

    </el-form>
    <div slot="footer" class="dialog-footer" content="c">
      <el-button @click="close">取消</el-button>
      <el-button type="primary" @click="createData()">提交</el-button>
    </div>
  </el-dialog>
</template>

<script>
  import cityThree from '@/components/cityThree'


  export default {
    name: "addressdialog",
    components: {cityThree},
    data() {
      return {
        resFrom: {},
      }
    },
    props: {
      s: Boolean
    },
    methods: {
      close() {
        this.$store.dispatch('set_show', false)
      },
      createData(){
        console.log(this.resFrom);
      }
    }
  }
</script>

<style scoped>

</style>
